from enum import Enum


class IndexPrefixEnum(str, Enum):
    """向量库索引前缀"""
    platform: str = "platform_"


IndexPrefixEnum.platform.label = "平台"


def get_index_by_platform(platform: str) -> str:
    if not platform:
        platform = "avl"
    return "{}{}".format(IndexPrefixEnum.platform.value, platform)
